<?php
$msg = stripslashes(urldecode($_POST["msgText"]));
$fname = stripslashes(urldecode($_POST["msgFile"]));
$file = fopen($fname,"w");
if (!$file) die ("cannot open the file");
fwrite($file, $msg);
fclose($file);
echo "The book has been successfully been saved";
?>
